package br.com.muralagil.controle;

import java.sql.SQLException;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import br.com.muralagil.bd.VagaDAO;
import br.com.muralagil.modelo.AtributosHomeReq;
import br.com.muralagil.modelo.VagaBean;

public class ControleHome extends ControleView {

	@Override
	public void carregaObjetosRequisicao(HttpServletRequest req) {
		
		List<VagaBean> vagas;
		try {
			vagas = VagaDAO.getListaVagas();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return;
		}
		
		req.setAttribute(AtributosHomeReq.LISTA_VAGAS.toString(), vagas);
	}
}
